#include "BaseTimer.h"

namespace LH
{
	ITimer::TimerID
		BaseTimer::schedule(
			TimerListener listener,
			std::chrono::milliseconds msecs)
	{
		return doSchedule(listener, msecs, std::chrono::milliseconds{ 0 }, false);
	}

	ITimer::TimerID
		BaseTimer::scheduleAtFixedRate(
			TimerListener listener,
			std::chrono::milliseconds msecs,
			std::chrono::milliseconds delay)
	{
		return doSchedule(listener, msecs, delay, true, Datum::FROM_LAST_TIMER);
	}

	ITimer::TimerID
		BaseTimer::scheduleAtFixedDelay(
			TimerListener listener,
			std::chrono::milliseconds msecs,
			std::chrono::milliseconds delay)
	{
		return doSchedule(listener, msecs, delay, true, Datum::FROM_NOW);
	}
}
